<extend name="Public/base" />
<block name="content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i class="icon-home"></i> 首页</a>
			<a href="{:U('Base/index')}">基础数据</a>
			<a href="{:U('Base/index')}">需求维护</a>
			<a href="{:U('Base/demandContent',array('pid'=>$info['demand_id']))}">需求内容</a>
			<a class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i>
						</span>
						<h5>{$meta_title}</h5>
					</div>
					<div class="widget-content nopadding">
						<form class="form-horizontal"  action="" method="post">
							<div class="control-group">
					            <label class="control-label">需求分类</label>
					            <div class="controls">
					            	<input type="text" class="text input-large" value="{$info.demand_name}" disabled>
					            </div>
					        </div>
							<div class="control-group">
					            <label class="control-label">需求内容</label>
					            <div class="controls">
					                <input type="text" class="text input-large" name="demand_content_name" value="{$info.demand_content_name|default=''|change_str}" maxlength="15">
					            </div>
					        </div>
							<div class="form-actions">
								<input type="hidden" name="demand_content_id" value="{$info.demand_content_id|default=''}">
								<input type="hidden" name="demand_id" value="{$info['demand_id']}">
								<button type="submit" class="btn btn-success" id="submit">保 存</button>
								<button type="button" class="btn btn-danger" onclick="javascript:history.back(-1);return false;">返 回</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function(){
	tke_form_focus();
	$("form").submit(function(){
		//锁定提交按钮
		$(this).attr('disabled',true);
		var self = $('form');
		$.post("{$post_url}", self.serialize(), call_back, "json");
		return false;
		/**
		 * @todo 接收登录返回值
		 * @author PHP@妖孽 <dino_ma@163.com>
		 */
		function call_back(data){
			if(data.status == 1){
				tke_alert(data.info,'alert-success');
				setTimeout(function(){
					window.location.href = data.url;
				},1000);
			} else {
				tke_alert(data.info,'alert-error');
				$("#submit").attr('disabled',false);
			}
		}
	});
});
//左侧导航高亮
highlight_subnav("{:U('Base/index')}");
</script>
</block>
